﻿<%@ Page Language="C#" AutoEventWireup="true" EnableEventValidation="false" ValidateRequest="false"
    CodeFile="AddColumn.aspx.cs" Inherits="Whir_System_Module_Role_AddColumn" %>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>栏目管理</title>

    <script language="javascript" type="text/javascript">
        if (top.location == self.location) { 
            alert('禁止访问子栏目页！将跳转到默认页面');
            top.location='../../Default.aspx';
        } 
    </script>
    <link href="../../Skin/Default/Css/main.css" rel="stylesheet" type="text/css" />

    <script src="../../Js/jquery/jquery1.3.11.pack.js" type="text/javascript"></script>
    <style type="text/css">
    .tabnav{
	padding:8px;
	height:25px;
	background-color:#EFEFEF;
	font-size:12px;
	font-weight: bold;
	color:#666666;
	border-top-width: 1px;
	border-top-style: solid;
	border-top-color: #999999;
    }
    </style>
    <script type="text/javascript">
	function expant(tabid,obj){
		var tabID = document.getElementById(tabid);
		if(tabID){
			if(tabID.style.display == ""){
				tabID.style.display = "none";
				obj.innerText = "展开";
			}
			else{
				tabID.style.display = "";
				obj.innerText = "折叠";
			}			
		}
	}
    </script>
</head>
<body>
    <form id="form1" runat="server">
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>

        <script src="../../Js/JQuery/jquery.tabs.pack.js" type="text/javascript"></script>

        <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
            <tr>
                <td width="74%" valign="top" align="left" id="left" runat="server">
                    <div id="tabsNav">
                        <div id="tab1nav" class="tabnav"> 基本设置 </div>
                        <div id="tab1">
                            <table border="0" align="center" cellpadding="3" cellspacing="1" width="100%">
                                <tr>
                                    <td height="30" align="center" class="form_tdText">父级栏目 </td>
                                    <td align="left" class="form_td">
                                        <asp:DropDownList ID="ddlParent" runat="server" CssClass="select_default">
                                        </asp:DropDownList>
                                    </td>
                                </tr>
                                <tr>
                                    <td height="30" align="center" class="form_tdText">栏目名称 </td>
                                    <td align="left" class="form_td">
                                        <asp:TextBox ID="txtColumnName" runat="server"></asp:TextBox>
                                        <asp:RequiredFieldValidator ID="rfvtxtColumnName" runat="server" ErrorMessage="* 必填"
                                            ControlToValidate="txtColumnName" Display="Dynamic"></asp:RequiredFieldValidator>
                                        <span class="form_desc">此栏目在栏目导航中的名称</span></td>
                                </tr>
                            </table>
                            
                        </div>
<div id="tab4nav" class="tabnav">[<span onClick="expant('tab4',this)" style="cursor:hand" class="grid_Title">展开</span>] 完整设置</div>
                        <div id="tab4" style="display:none">
                            <table border="0" align="center" cellpadding="0" cellspacing="1" width="100%">
							<tr style="display:none">
                                    <td height="30" align="center" class="form_tdText">生成 </td>
                                    <td align="left" class="form_td">
                                        <asp:CheckBox ID="cbIsCreateHtml" runat="server" Text="是否生成静态（*. html）页面" Checked="true" />
                                    </td>
                                </tr>
                                <tr style="display:none">
                                    <td height="30" align="center" class="form_tdText">单页 </td>
                                    <td align="left" class="form_td">
                                       <asp:RadioButtonList ID="rblIsSinglePage" runat="server" RepeatDirection="Horizontal"
                                    RepeatLayout="Flow">
                                    <asp:ListItem Text="当前栏目是单篇文章页面" Value="1"></asp:ListItem>
                                    <asp:ListItem Text="当前栏目是列表页面" Value="0" Selected="True"></asp:ListItem>
                                </asp:RadioButtonList>
                                    </td>
                                </tr>                                
                                <tr style="display: none;">
                                    <td height="30" align="center" class="form_tdText">栏目小图 </td>
                                    <td align="left" class="form_td">
                                        <asp:FileUpload ID="FileUpload1" runat="server" />
                                    </td>
                                </tr>                            
                            <tr>
                            <td height="30" align="center" class="form_tdText">生成目录 </td>
                            <td align="left" class="form_td">
                                <asp:DropDownList ID="ddlDirectory" runat="server">
                                    <asp:ListItem Text="中文文件夹" Value="cn"></asp:ListItem>
                                    <asp:ListItem Text="英文文件夹" Value="en"></asp:ListItem>
                                </asp:DropDownList>
                                <span class="form_desc">该栏目生成的静态页面存放的位置</span></td>
                        </tr>
                        <tr>
                            <td height="30" align="center" class="form_tdText">静态页面名称 </td>
                            <td align="left" class="form_td">
                                <asp:TextBox ID="txtUrl" runat="server" Width="180px" Text="*.html"></asp:TextBox>
                                <span class="form_desc">此栏目生成的静态文件名称</span> </td>
                        </tr>
                        <tr>
                            <td width="80" height="30" align="center" class="form_tdText">所属表单 </td>
                            <td align="left" class="form_td">
                                <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                                    <ContentTemplate>
                                        <div style="display:none;">选择模块：
                                        <asp:DropDownList ID="ddlModule" runat="server" OnSelectedIndexChanged="ddlModule_SelectedIndexChanged"
                                            AutoPostBack="true" CssClass="select_default">
                                        </asp:DropDownList><br /></div>
                                        选择功能模块：
                                        <asp:DropDownList ID="ddlModel" runat="server" OnSelectedIndexChanged="ddlModel_SelectedIndexChanged"
                                            AutoPostBack="true" CssClass="select_default">
                                            <asp:ListItem Text="-- 功能模块列表 --" Value="-1"></asp:ListItem>
                                        </asp:DropDownList><br />
                                        选&nbsp;择&nbsp;表&nbsp;单&nbsp;：
                                        <asp:DropDownList ID="ddlForm" runat="server" CssClass="select_default">
                                            <asp:ListItem Text="-- 请选择 --" Value="-1"></asp:ListItem>
                                        </asp:DropDownList>
                                        <div id="divForm" runat="server" visible="false"></div>
                                        <div id="divForms" runat="server" visible="false">
                                            所属表单组：
                                            <asp:DropDownList ID="ddlModelForms" runat="server" CssClass="select_default">
                                            </asp:DropDownList></div>
                                    </ContentTemplate>
                                </asp:UpdatePanel>
                            </td>
                        </tr>
                        <tr>
                            <td height="30" align="center" class="form_tdText">首页模板 </td>
                            <td align="left" class="form_td">
                                <asp:TextBox ID="txtDefaultTemp" runat="server" Width="180px" />
                                <whir:FileBrowserButton ID="FileBrowserButton2" runat="server" Text="点击选择" AssociatedControlID="txtDefaultTemp" ResourceType="Template" /><br />
                                <span class="form_desc">当前栏目为首页则选择此项</span> </td>
                        </tr>
                        <tr>
                            <td height="30" align="center" class="form_tdText">列表页模板 </td>
                            <td align="left" class="form_td">
                                <asp:TextBox ID="txtListTemp" runat="server" Width="180px" />
                                <whir:FileBrowserButton ID="FileBrowserButton1" runat="server" Text="点击选择" AssociatedControlID="txtListTemp" /><br />
                                <span class="form_desc">当前栏目为列表页则选择此项</span> </td>
                        </tr>
                        <tr>
                            <td height="30" align="center" class="form_tdText">内容页模板 </td>
                            <td align="left" class="form_td">
                                <asp:TextBox ID="txtContentTemp" runat="server" Width="180px" />
                                <whir:FileBrowserButton ID="FileBrowserButton3" runat="server" Text="点击选择" AssociatedControlID="txtContentTemp" /><br />
                                <span class="form_desc">当前栏目为单篇信息页面，或者是列表页的详细内容页面选择此项</span> </td>
                        </tr>                               
                            </table>
                        </div>                        
                        <div id="tab2nav" class="tabnav">[<span onClick="expant('tab2',this)" style="cursor:hand" class="grid_Title">展开</span>] SEO设置 / 搜索关键字设置</div>
                        <div id="tab2" style="display:none">
                        	<table border="0" align="center" cellpadding="0" cellspacing="1" width="100%">
                            <tr>
                            <td height="30" align="center" class="form_tdText">MetaTitle </td>
                            <td align="left" class="form_td">
                                <asp:TextBox ID="txtMetaTitle" runat="server" Width="180px"></asp:TextBox>
                            </td>
                            </tr>
                            <tr>
                                <td height="30" align="center" class="form_tdText">KeyWord </td>
                                <td align="left" class="form_td">
                                    <asp:TextBox ID="txtMetaKey" runat="server" TextMode="MultiLine" Width="400px" Height="60px"
                                        CssClass="input_textarea"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td height="30" align="center" class="form_tdText">Content </td>
                                <td align="left" class="form_td">
                                    <asp:TextBox ID="txtMetaDesc" runat="server" TextMode="MultiLine" Width="400px" Height="60px"
                                        CssClass="input_textarea"></asp:TextBox>
                                </td>
                            </tr>
                            </table>
                        </div>
                        <div id="tab3nav" class="tabnav">[<span onClick="expant('tab3',this)" style="cursor:hand" class="grid_Title">展开</span>] 其它设置</div>
                        <div id="tab3" style="display:none">
                            <table border="0" align="center" cellpadding="0" cellspacing="1" width="100%">
                            <tr>
                                    <td height="30" align="center" class="form_tdText">权限 </td>
                                    <td align="left" class="form_td">
                                        <asp:CheckBox ID="cbIsUse" runat="server" Text="是否使用权限管理" Checked="true" />
                                        <font color="red">〖注：创建后该项将不可更改〗</font> </td>
                                </tr>
                                <tr>
                            <td height="30" align="center" class="form_tdText">处理页面 </td>
                            <td align="left" class="form_td">
                                <asp:TextBox ID="txtOperatePage" runat="server" Width="250px"></asp:TextBox>
                                <select id="selectPro" onchange="selectpro(this.options.selectedIndex)">
                                    <option selected="selected">== 系统预留模块 == </option>
                                    <option>在线反馈</option>
                                    <option>网上调查</option>
                                </select>
                                <br />
                                <span class="form_desc">当前栏目不用功能模块处理，用自定义的程序来处理</span> </td>
                        </tr>
                        <tr>
                            <td height="30" align="center" class="form_tdText">后台参数 </td>
                            <td align="left" class="form_td">
                                <asp:TextBox ID="txtParam" runat="server" Width="300px"></asp:TextBox>
                                <span class="form_desc">程序传入的参数</span> </td>
                        </tr>
                            </table>
                        </div>
                    </div>
                    <table border="0" align="center" cellpadding="3" cellspacing="1" width="98%">
                        <tr>
                            <td height="30" colspan="2" align="center">
                                <asp:Button ID="btnUpdate" runat="server" Text="修改" CssClass="btn_default" OnClick="btnUpdate_Click" />&nbsp;                                
                                <input type="button" value="关闭" class="btn_default" onclick="parent.tb_remove();" />
                            </td>
                        </tr>
                    </table>
                </td>                
            </tr>
        </table>
    </form>

</body>
</html>
<script language="javascript" type="text/javascript" src="../../Js/common.js"></script>
<script type="text/javascript" type="text/javascript">initAutoFormStyle();</script>
<script language="javascript" type="text/javascript">
function selectpro(id){
    var operatePage = document.getElementById('<%=txtOperatePage.ClientID %>');
    if(id == '0'){
        operatePage.value = '';
    }else if(id == '1'){
        operatePage.value = 'Module/Reply/Default.aspx';
    }else if(id == '2'){
        operatePage.value = 'Module/Survey/Default.aspx';
    }
}
</script>